<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="cityList"/></title>
<link href="<s:url value="/css/style.css"/>" rel="stylesheet" type="text/css" />
<link href="<s:url value="/css/admin.css"/>" rel="stylesheet" type="text/css" />
<script src="<s:url value="/js/jquery.js"/>" type="text/javascript"></script>
</head>
<body>
<div class="container">
	<div class="title"><s:text name="cityList"/></div>
	<div class="content">

		<table class="tab1">
			<thead>
				<tr>
					<td width="5%">序号</td>
					<td>城市名称</td>
					<td width="10%">城市简称</td>
					<td width="10%">开通状态</td>
					<td width="15%">操作</td>
				</tr>
			</thead>
			<tbody class="center">
			<s:if test="!cities.empty">
			<s:iterator value="cities" var="t" status="status">
				<tr>
					<td><s:property value="#status.count"/></td>
					<td>${name}</td>
					<td>${nickname}</td>
					<td><s:text name="%{start?'cityIsStart':'cityNotStart'}"></s:text></td>
					<td> 
						<a href="<s:url value='/admin/city/%{id}/edit'/>"><s:text name="xiugai"/></a>
						<s:if test="!start">
						<a href="<s:url value='/admin/city/%{id}/start'/>" onclick="return confirm('确认开通？')">
							<s:text name="startCity"/></a>
						</s:if>
						<s:else>
						<a href="<s:url value='/admin/city/%{id}/close'/>" onclick="return confirm('确认关闭？')">
							<s:text name="closeCity"/></a>
						</s:else>
					</td>
				</tr>
			</s:iterator>	
			</s:if>
			<s:else>
				<tr>
					<td colspan="5"><s:text name="nodata"/></td>
				</tr>
			</s:else>
			</tbody>
		</table>

		<div class="padding">
			<s:include value="/page/common/page.jsp" />
		</div>

	</div>
</div>
</body>
</html>